//
//  AppDelegate+QSLocalNotification.swift
//  TestSwift
//
//  Created by Song on 2018/7/24.
//  Copyright © 2018年 Song. All rights reserved.
//

import Foundation

extension AppDelegate {
    /// 程序开启调用
    func application(didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) {
        if launchOptions != nil {
            let notification = launchOptions![UIApplicationLaunchOptionsKey.localNotification] as? UILocalNotification
            
            if notification != nil {
                // 接收到本地推送时的操作
            }
        }
    }
    
    /// 接收到本地推送
    func application(_ application: UIApplication, didReceive notification: UILocalNotification) {
        // 自定义的数据
        let info = notification.userInfo as! [String: Any]
        // 接收到本地推送时的操作
    }
}
